
extends Node2D

# member variables here, example:
# var a=2
# var b="textvar"

var speed=3
var group=null
var cellHeight
func _ready():
	# Called every time the node is added to the scene.
	# Initialization here
	group=get_node("group")
	set_fixed_process(true)
	pass
	


func _fixed_process(delta):
	movebg(get_node("group"),speed)
	movebg(get_node("group1"),speed*.5)
	
	
func movebg(bg,sp):
	var pos=bg.get_pos()
	pos.y+=sp
	if pos.y>=0:
		pos.y=-1700
	bg.set_pos(pos)
	

